home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / vbcc / machines / amigappc / doc / pasm.doc < prev    next >
Encoding:
Text File  |  1998-06-24  |  27.0 KB  |  2,097 lines

  1. =======================================
  2. Short instruction for pasm beta version
  3. =======================================
  4.  
  5. pasm can currently generate either ELF objects or absolute files.
  6.  
  7. All PowerPC standard instructions are supported: User level-, super-
  8. visor level-, optional-, 32-bit and 64-bit instructions.
  9.  
  10. All 32-bit extended mnemonics are supported and most of the 64-bit
  11. extended mnemonics.
  12.  
  13.  
  14.  
  15. DIRECTIVES
  16. ==========
  17.  
  18.  
  19. .ascii <exp1>[,<exp2>,"<string1>"...]
  20. ----------------------------------
  21. See ".byte".
  22.  
  23.  
  24. .asciiz "<string1>"[,"<string2>"...]
  25. ------------------------------------
  26. See ".string".
  27.  
  28.  
  29. .align <bit_count>
  30. ------------------
  31. Insert as much zero bytes as required to reach an address where
  32. <bit_count> low order bits are zero. For example ".align 2" would
  33. make an alignment to the next 32-bit boundary.
  34.  
  35.  
  36. .baserel <section>,<base_reg>
  37. -----------------------------
  38. Allow base relative access via register <base_reg> in the section
  39. called <section>. In absolute mode, <base_reg> must be initialized
  40. with an address pointing 32764 bytes behind the start address of
  41. this section. In EHF, <base_reg> must be initialized with the linker
  42. symbol _LinkerDB. In ELF/SystemV ABI small data or TOC addressing
  43. is not supported. (?)
  44.  
  45. By default, base relative access via r2 (rtoc) on the section
  46. ".tocd" is set.
  47.  
  48.  
  49. .bss <symbol>,<size>[,<alignment>]
  50. ----------------------------------
  51. Allocate <size> bytes of space in the .bss section and assign
  52. the value to that location to <symbol>. If <alignment> is given,
  53. then the space will be aligned to an address having <alignment>
  54. low zero bits or 2, whichever is greater.
  55. <symbol> may be made globally visible by the .globl directive.
  56.  
  57.  
  58. .byte <exp1>[,<exp2>,"<string1>"...]
  59. ------------------------------------
  60. Assign the integer or string constant operands into successive
  61. bytes of memory in the current section. Any combination of integer
  62. and character string constant operands is permitted.
  63.  
  64.  
  65. .comm <symbol>,<size>
  66. ---------------------
  67. Allocate <size> bytes of space in the .bss section and assign
  68. the value to that location to <symbol>. <symbol> is always made
  69. globally visible. ".comm"-areas of less than 8 bytes in size are
  70. aligned to word boundaries, otherwise to doubleword boundaries.
  71.  
  72.  
  73. .double <float1>[,<float2>...]
  74. ------------------------------
  75. If the current section location counter is not on a doubleword
  76. boundary advance it to the next doubleword boundary. Then assign
  77. the values of the operands as IEEE 754 double-precision 64-bit
  78. format numbers to successive doublewords of memory in the current
  79. section.
  80.  
  81.  
  82. .else
  83. -----
  84. Begins the "else"-part in a block of conditional assembly.
  85.  
  86.  
  87. .endif
  88. ------
  89. Ends a block of conditional assembly.
  90.  
  91.  
  92. .endm
  93. -----
  94. Ends a macro definition.
  95.  
  96.  
  97. .extern <symbol>
  98. ----------------
  99. See ".globl".
  100.  
  101.  
  102. .fail
  103. -----
  104. Abort assembly with displaying the error message "fail directive
  105. encountered".
  106.  
  107.  
  108. .file "<file name>"
  109. -------------------
  110. Specify the source file name, which is included into the object
  111. file as a symbol of type "FILE" with local binding.
  112.  
  113.  
  114. .float <float1>[,<float2>...]
  115. -----------------------------
  116. If the current section location counter is not on a word boundary
  117. advance it to the next word boundary. Then assign the values of the
  118. operands as IEEE 754 single precision 32-bit format numbers to
  119. successive words of memory in the current section.
  120.  
  121.  
  122. .global <symbol>
  123. ----------------
  124. See ".globl".
  125.  
  126.  
  127. .globl <symbol>
  128. ---------------
  129. Flag <symbol> as an external symbol, which means that <symbol> is
  130. visible to all modules in the linking process. It may be either
  131. defined or undefined.
  132.  
  133.  
  134. .half <exp1>[,<exp2>...]
  135. ------------------------
  136. If the current section location counter is not on a halfword
  137. boundary, advance it to the next halfword boundary. Then, assign
  138. the values of the operands into successive halfwords of memory in
  139. the current section.
  140.  
  141.  
  142. .ident "<string>"
  143. -----------------
  144. Place an indentification string into the .comment section (ELF)
  145. or use it as object unit title (EHF).
  146.  
  147.  
  148. .if<cond> <exp>
  149. ---------------
  150. The following block will only be assembled, if the condition <cond>
  151. is valid for the expression <exp>. Available conditions are:
  152. .if     assemble, if <exp> is not zero.
  153. .ifeq   assemble, if <exp> is zero.
  154. .ifne   assemble, if <exp> is not zero.
  155. .ifgt   assemble, if <exp> is greater than zero.
  156. .ifge   assemble, if <exp> is greater than zero or equal (positive).
  157. .iflt   assemble, if <exp> is less than zero (negative).
  158. .ifle   assemble, if <exp> is less than zero or equal.
  159. .ifdef  assemble, if <exp> is defined.
  160. .ifndef assemble, if <exp> is undefined.
  161.  
  162. A block of conditional assembly is ended by ".endif". A maximum of
  163. eight if-levels is allowed.
  164.  
  165.  
  166. .include <file name>
  167. --------------------
  168. Includes another source text. Besides the current directory, all
  169. include paths, defined by the -I option, are searched.
  170.  
  171.  
  172. .lcomm <symbol>,<size>[,<alignment>]
  173. ------------------------------------
  174. See ".bss".
  175.  
  176.  
  177. .local <symbol>
  178. ---------------
  179. Explicitely declare symbol to have local binding. It is not
  180. visible outside the object file containing its definition.
  181. <symbol> must be known (ELF only).
  182.  
  183.  
  184. .long <exp1>[,<exp2>...]
  185. ------------------------
  186. See ".word".
  187.  
  188.  
  189. .macro <name>
  190. -------------
  191. Define a new macro, called <name>. Macro parameters can be acces-
  192. sed by \1 to \9. \0 is reserved for the branch hint. Example:
  193.  
  194. .macro  bdz
  195.         bc\0   18,0,\1
  196. .endm
  197.  
  198. \@ will be replaced by a unique number on every macro invocation
  199. and should be used when defining labels in a macro.
  200.  
  201.  
  202. .newsection <name>[,"<attributes>"]
  203. -----------------------------------
  204. This directives differs from the normal .section directive in the
  205. case if a section called <name> already exists. .newsection will
  206. then force the start of a new section with the same name and
  207. effectively ends any further definition for the earlier section.
  208. For the rest, see ".section".
  209.  
  210.  
  211. .section <name>[,"<attributes>"]
  212. --------------------------------
  213. Starts a new section named <name> or reactivate an old one. If
  214. attributes are given for an already existing section, they must
  215. match exactly. The section's name will also be defined as a new
  216. symbol, which represents the section's start address.
  217.  
  218. The "<attributes>" string may consist of the following characters:
  219.  
  220. Section Contents:
  221. c - section has code
  222. d - section has initialized data
  223. u - section has uninitialized data
  224. i - section has directives (info section)
  225. n - section can be discarded
  226. R - remove section at link time
  227.  
  228. Section Protection:
  229. r - section is readable
  230. w - section is writable
  231. x - section is executable
  232. s - section is sharable
  233.  
  234. Section Alignment (only one):
  235. 0 - align to byte boundary
  236. 1 - align to halfword boundary
  237. 2 - align to word boundary
  238. 3 - align to doubleword boundary
  239. 4 - align to quadword boundary
  240. 5 - align to 32 byte boundary
  241. 6 - align to 64 byte boundary
  242.  
  243.  
  244. .set <symbol>,<expression>
  245. --------------------------
  246. Create a new program symbol with the name <symbol> and assign to it
  247. the value of <expression>. If <symbol> is already assigned, it will
  248. contain a new value from now on. If <expression> is undefined in
  249. pass 1 (because symbols in it are defined some lines later) it will
  250. get a default value of '1', which is changed in pass 2 to the
  251. correct value. So it is visible for .ifdef, etc.
  252.  
  253.  
  254. .size <symbol>,<size>
  255. ---------------------
  256. Set the size in bytes of an object defined at <symbol>.
  257.  
  258.  
  259. .short <exp1>[,<exp2>...]
  260. -------------------------
  261. See ".half".
  262.  
  263.  
  264. .space <exp>
  265. ------------
  266. Insert <exp> zero bytes into the current section.
  267.  
  268.  
  269. .string "<string1>"[,"<string2>"...]
  270. ------------------------------------
  271. Assign the characters in each string along with a final zero byte
  272. to successive memory locations in the current section.
  273.  
  274.  
  275. .type <symbol>,<type>
  276. ---------------------
  277. Set type of symbol called <symbol> to <type>, which must be one of:
  278. 1: Object
  279. 2: Function
  280. 3: Section
  281. 4: File
  282.  
  283. The predefined symbols @object and @function are available for
  284. this purpose.
  285.  
  286.  
  287. .uadouble <float1>[,<float2>...]
  288. --------------------------------
  289. Assign the values of the operands as IEEE 754 double-precision 64-
  290. bit format numbers to successive eight-byte areas of memory in the
  291. current section regardless of section alignment.
  292.  
  293.  
  294. .uafloat <float1>[,<float2>...]
  295. -------------------------------
  296. Assign the values of the operands as IEEE 754 single precision 32-
  297. bit format numbers to successive 4-byte areas of memory in the
  298. current section regardless of section alignment.
  299.  
  300.  
  301. .uahalf <exp1>[,<exp2>...]
  302. --------------------------
  303. Assign the values of the operands into successive two byte areas of
  304. memory in the current section regardless of section alignment.
  305.  
  306.  
  307. .ualong <exp1>[,<exp2>...]
  308. --------------------------
  309. See ".uaword".
  310.  
  311.  
  312. .uashort <exp1>[,<exp2>...]
  313. ---------------------------
  314. See ".uahalf".
  315.  
  316.  
  317. .uaword <exp1>[,<exp2>...]
  318. --------------------------
  319. Assign the values of the operands into successive four-byte areas
  320. of memory in the current section regardless of section alignment.
  321.  
  322.  
  323. .word <exp1>[,<exp2>...]
  324. ------------------------
  325. If the current section location counter is not on a word boundary
  326. advance it to the next word boundary. Then assign the values of the
  327. operands into successive words of memory in the current section.
  328.  
  329.  
  330.  
  331. PREDEFINED SYMBOLS
  332. ==================
  333.  
  334. There are two symbols, which are always updated by the assembler.
  335.  
  336. $       Current address counter value.
  337.  
  338. $NARG   Number of macro arguments during macro execution.
  339.         It is zero, when outside of a macro.
  340.  
  341. The following symbols are constant and may be deactivated by
  342. specifying the -R option.
  343.  
  344.         .set r0,0
  345.         .set r1,1
  346.         .set r2,2
  347.         .set r3,3
  348.         .set r4,4
  349.         .set r5,5
  350.         .set r6,6
  351.         .set r7,7
  352.         .set r8,8
  353.         .set r9,9
  354.         .set r10,10
  355.         .set r11,11
  356.         .set r12,12
  357.         .set r13,13
  358.         .set r14,14
  359.         .set r15,15
  360.         .set r16,16
  361.         .set r17,17
  362.         .set r18,18
  363.         .set r19,19
  364.         .set r20,20
  365.         .set r21,21
  366.         .set r22,22
  367.         .set r23,23
  368.         .set r24,24
  369.         .set r25,25
  370.         .set r26,26
  371.         .set r27,27
  372.         .set r28,28
  373.         .set r29,29
  374.         .set r30,30
  375.         .set r31,31
  376.         .set f0,0
  377.         .set f1,1
  378.         .set f2,2
  379.         .set f3,3
  380.         .set f4,4
  381.         .set f5,5
  382.         .set f6,6
  383.         .set f7,7
  384.         .set f8,8
  385.         .set f9,9
  386.         .set f10,10
  387.         .set f11,11
  388.         .set f12,12
  389.         .set f13,13
  390.         .set f14,14
  391.         .set f15,15
  392.         .set f16,16
  393.         .set f17,17
  394.         .set f18,18
  395.         .set f19,19
  396.         .set f20,20
  397.         .set f21,21
  398.         .set f22,22
  399.         .set f23,23
  400.         .set f24,24
  401.         .set f25,25
  402.         .set f26,26
  403.         .set f27,27
  404.         .set f28,28
  405.         .set f29,29
  406.         .set f30,30
  407.         .set f31,31
  408.         .set cr0,0
  409.         .set cr1,1
  410.         .set cr2,2
  411.         .set cr3,3
  412.         .set cr4,4
  413.         .set cr5,5
  414.         .set cr6,6
  415.         .set cr7,7
  416.         .set lt,0
  417.         .set gt,1
  418.         .set eq,2
  419.         .set so,3
  420.         .set un,3
  421.         .set sp,1
  422.         .set rtoc,2
  423.         .set fp,31
  424.         .set fpscr,0
  425.         .set xer,1
  426.         .set lr,8
  427.         .set ctr,9
  428.  
  429.  
  430.  
  431. PREDEFINED SECTIONS
  432. ===================
  433.         .section .text,"crx3"
  434.         .section .data,"drw3"
  435.         .section .bss,"urw3"
  436.         .section .rodata,"dr3"
  437.         .section .tocd,"drw3"
  438.  
  439.  
  440.  
  441. EXTENDED MNEMONICS
  442. ==================
  443.  
  444. There is a huge set of extended mnemonics, proposed by Motorola
  445. and IBM in the "PowerPC Programming Environments", to make the
  446. programmer's life easier. Except for some 64-bit mnemonics (I only
  447. downloaded the 32-bit manuals for now), pasm supports them all.
  448.  
  449. Currently all extended mnemonics (except "la") are implemented
  450. as macros and can be deactivated with the -X option.
  451.  
  452.  
  453. List of extended mnemonics
  454. --------------------------
  455. .macro subi
  456.  addi \1,\2,-(\3)
  457. .endm
  458.  
  459. .macro subis
  460.  addis \1,\2,-(\3)
  461. .endm
  462.  
  463. .macro subic
  464.  addic \1,\2,-(\3)
  465. .endm
  466.  
  467. .macro subic.
  468.  addic. \1,\2,-(\3)
  469. .endm
  470.  
  471. .macro sub
  472.  subf \1,\3,\2
  473. .endm
  474.  
  475. .macro sub.
  476.  subf. \1,\3,\2
  477. .endm
  478.  
  479. .macro subo
  480.  subfo \1,\3,\2
  481. .endm
  482.  
  483. .macro subo.
  484.  subfo. \1,\3,\2
  485. .endm
  486.  
  487. .macro subc
  488.  subfc \1,\3,\2
  489. .endm
  490.  
  491. .macro subc.
  492.  subfc. \1,\3,\2
  493. .endm
  494.  
  495. .macro subco
  496.  subfco \1,\3,\2
  497. .endm
  498.  
  499. .macro subco.
  500.  subfco. \1,\3,\2
  501. .endm
  502.  
  503. .macro cmpwi
  504. .ifeq $NARG-2
  505.  cmpi 0,0,\1,\2
  506. .else
  507.  cmpi \1,0,\2,\3
  508. .endif
  509. .endm
  510.  
  511. .macro cmpw
  512. .ifeq $NARG-2
  513.  cmp 0,0,\1,\2
  514. .else
  515.  cmp \1,0,\2,\3
  516. .endif
  517. .endm
  518.  
  519. .macro cmplwi
  520. .ifeq $NARG-2
  521.  cmpli 0,0,\1,\2
  522. .else
  523.  cmpli \1,0,\2,\3
  524. .endif
  525. .endm
  526.  
  527. .macro cmplw
  528. .ifeq $NARG-2
  529.  cmpl 0,0,\1,\2
  530. .else
  531.  cmpl \1,0,\2,\3
  532. .endif
  533. .endm
  534.  
  535. .macro cmpdi
  536. .ifeq $NARG-2
  537.  cmpi 0,1,\1,\2
  538. .else
  539.  cmpi \1,1,\2,\3
  540. .endif
  541. .endm
  542.  
  543. .macro cmpd
  544. .ifeq $NARG-2
  545.  cmp 0,1,\1,\2
  546. .else
  547.  cmp \1,1,\2,\3
  548. .endif
  549. .endm
  550.  
  551. .macro cmpldi
  552. .ifeq $NARG-2
  553.  cmpli 0,1,\1,\2
  554. .else
  555.  cmpli \1,1,\2,\3
  556. .endif
  557. .endm
  558.  
  559. .macro cmpld
  560. .ifeq $NARG-2
  561.  cmpl 0,1,\1,\2
  562. .else
  563.  cmpl \1,1,\2,\3
  564. .endif
  565. .endm
  566.  
  567.  
  568. .macro extlwi
  569.  rlwinm \1,\2,\4,0,(\3)-1
  570. .endm
  571.  
  572. .macro extlwi.
  573.  rlwinm. \1,\2,\4,0,(\3)-1
  574. .endm
  575.  
  576. .macro extrwi
  577.  rlwinm \1,\2,(\4)+(\3),32-(\3),31
  578. .endm
  579.  
  580. .macro extrwi.
  581.  rlwinm. \1,\2,(\4)+(\3),32-(\3),31
  582. .endm
  583.  
  584. .macro inslwi
  585.  rlwimi \1,\2,32-(\4),\4,((\4)+(\3))-1
  586. .endm
  587.  
  588. .macro inslwi.
  589.  rlwimi. \1,\2,32-(\4),\4,((\4)+(\3))-1
  590. .endm
  591.  
  592. .macro insrwi
  593.  rlwimi \1,\2,32-((\4)+(\3)),\4,((\4)+(\3))-1
  594. .endm
  595.  
  596. .macro insrwi.
  597.  rlwimi. \1,\2,32-((\4)+(\3)),\4,((\4)+(\3))-1
  598. .endm
  599.  
  600. .macro rotlwi
  601.  rlwinm \1,\2,\3,0,31
  602. .endm
  603.  
  604. .macro rotlwi.
  605.  rlwinm. \1,\2,\3,0,31
  606. .endm
  607.  
  608. .macro rotrwi
  609.  rlwinm \1,\2,32-(\3),0,31
  610. .endm
  611.  
  612. .macro rotrwi.
  613.  rlwinm. \1,\2,32-(\3),0,31
  614. .endm
  615.  
  616. .macro rotlw
  617.  rlwnm \1,\2,\3,0,31
  618. .endm
  619.  
  620. .macro rotlw.
  621.  rlwnm. \1,\2,\3,0,31
  622. .endm
  623.  
  624. .macro slwi
  625.  rlwinm \1,\2,\3,0,31-(\3)
  626. .endm
  627.  
  628. .macro slwi.
  629.  rlwinm. \1,\2,\3,0,31-(\3)
  630. .endm
  631.  
  632. .macro srwi
  633.  rlwinm \1,\2,32-(\3),\3,31
  634. .endm
  635.  
  636. .macro srwi.
  637.  rlwinm. \1,\2,32-(\3),\3,31
  638. .endm
  639.  
  640. .macro clrlwi
  641.  rlwinm \1,\2,0,\3,31
  642. .endm
  643.  
  644. .macro clrlwi.
  645.  rlwinm. \1,\2,0,\3,31
  646. .endm
  647.  
  648. .macro clrrwi
  649.  rlwinm \1,\2,0,0,31-(\3)
  650. .endm
  651.  
  652. .macro clrrwi.
  653.  rlwinm. \1,\2,0,0,31-(\3)
  654. .endm
  655.  
  656. .macro clrlslwi
  657.  rlwinm \1,\2,\4,(\3)-(\4),31-(\4)
  658. .endm
  659.  
  660. .macro clrlslwi.
  661.  rlwinm. \1,\2,\4,(\3)-(\4),31-(\4)
  662. .endm
  663.  
  664.  
  665. .macro bt
  666.  bc\0 12,\1,\2
  667. .endm
  668.  
  669. .macro bf
  670.  bc\0 4,\1,\2
  671. .endm
  672.  
  673. .macro bdnz
  674.  bc\0 16,0,\1
  675. .endm
  676.  
  677. .macro bdnzt
  678.  bc\0 8,\1,\2
  679. .endm
  680.  
  681. .macro bdnzf
  682.  bc\0 0,\1,\2
  683. .endm
  684.  
  685. .macro bdz
  686.  bc\0 18,0,\1
  687. .endm
  688.  
  689. .macro bdzt
  690.  bc\0 10,\1,\2
  691. .endm
  692.  
  693. .macro bdzf
  694.  bc\0 2,\1,\2
  695. .endm
  696.  
  697. .macro bta
  698.  bca\0 12,\1,\2
  699. .endm
  700.  
  701. .macro bfa
  702.  bca\0 4,\1,\2
  703. .endm
  704.  
  705. .macro bdnza
  706.  bca\0 16,0,\1
  707. .endm
  708.  
  709. .macro bdnzta
  710.  bca\0 8,\1,\2
  711. .endm
  712.  
  713. .macro bdnzfa
  714.  bca\0 0,\1,\2
  715. .endm
  716.  
  717. .macro bdza
  718.  bca\0 18,0,\1
  719. .endm
  720.  
  721. .macro bdzta
  722.  bca\0 10,\1,\2
  723. .endm
  724.  
  725. .macro bdzfa
  726.  bca\0 2,\1,\2
  727. .endm
  728.  
  729. .macro blr
  730.  bclr 20,0
  731. .endm
  732.  
  733. .macro btlr
  734.  bclr\0 12,\1
  735. .endm
  736.  
  737. .macro bflr
  738.  bclr\0 4,\1
  739. .endm
  740.  
  741. .macro bdnzlr
  742.  bclr\0 16,0
  743. .endm
  744.  
  745. .macro bdnztlr
  746.  bclr\0 8,\1
  747. .endm
  748.  
  749. .macro bdnzflr
  750.  bclr\0 0,\1
  751. .endm
  752.  
  753. .macro bdzlr
  754.  bclr\0 18,0
  755. .endm
  756.  
  757. .macro bdztlr
  758.  bclr\0 10,\1
  759. .endm
  760.  
  761. .macro bdzflr
  762.  bclr\0 2,\1
  763. .endm
  764.  
  765. .macro bctr
  766.  bcctr 20,0
  767. .endm
  768.  
  769. .macro btctr
  770.  bcctr\0 12,\1
  771. .endm
  772.  
  773. .macro bfctr
  774.  bcctr\0 4,\1
  775. .endm
  776.  
  777. .macro btl
  778.  bcl\0 12,\1,\2
  779. .endm
  780.  
  781. .macro bfl
  782.  bcl\0 4,\1,\2
  783. .endm
  784.  
  785. .macro bdnzl
  786.  bcl\0 16,0,\1
  787. .endm
  788.  
  789. .macro bdnztl
  790.  bcl\0 8,\1,\2
  791. .endm
  792.  
  793. .macro bdnzfl
  794.  bcl\0 0,\1,\2
  795. .endm
  796.  
  797. .macro bdzl
  798.  bcl\0 18,0,\1
  799. .endm
  800.  
  801. .macro bdztl
  802.  bcl\0 10,\1,\2
  803. .endm
  804.  
  805. .macro bdzfl
  806.  bcl\0 2,\1,\2
  807. .endm
  808.  
  809. .macro btla
  810.  bcla\0 12,\1,\2
  811. .endm
  812.  
  813. .macro bfla
  814.  bcla\0 4,\1,\2
  815. .endm
  816.  
  817. .macro bdnzla
  818.  bcla\0 16,0,\1
  819. .endm
  820.  
  821. .macro bdnztla
  822.  bcla\0 8,\1,\2
  823. .endm
  824.  
  825. .macro bdnzfla
  826.  bcla\0 0,\1,\2
  827. .endm
  828.  
  829. .macro bdzla
  830.  bcla\0 18,0,\1
  831. .endm
  832.  
  833. .macro bdztla
  834.  bcla\0 10,\1,\2
  835. .endm
  836.  
  837. .macro bdzfla
  838.  bcla\0 2,\1,\2
  839. .endm
  840.  
  841. .macro blrl
  842.  bclrl 20,0
  843. .endm
  844.  
  845. .macro btlrl
  846.  bclrl\0 12,\1
  847. .endm
  848.  
  849. .macro bflrl
  850.  bclrl\0 4,\1
  851. .endm
  852.  
  853. .macro bdnzlrl
  854.  bclrl\0 16,0
  855. .endm
  856.  
  857. .macro bdnztlrl
  858.  bclrl\0 8,\1
  859. .endm
  860.  
  861. .macro bdnzflrl
  862.  bclrl\0 0,\1
  863. .endm
  864.  
  865. .macro bdzlrl
  866.  bclrl\0 18,0
  867. .endm
  868.  
  869. .macro bdztlrl
  870.  bclrl\0 10,\1
  871. .endm
  872.  
  873. .macro bdzflrl
  874.  bclrl\0 2,\1
  875. .endm
  876.  
  877. .macro bctrl
  878.  bcctrl 20,0
  879. .endm
  880.  
  881. .macro btctrl
  882.  bcctrl\0 12,\1
  883. .endm
  884.  
  885. .macro bfctrl
  886.  bcctrl\0 4,\1
  887. .endm
  888.  
  889.  
  890. .macro blt
  891. .ifeq $NARG-1
  892.  bc\0 12,0,\1
  893. .else
  894.  bc\0 12,4*(\1)+0,\2
  895. .endif
  896. .endm
  897.  
  898. .macro ble
  899. .ifeq $NARG-1
  900.  bc\0 4,1,\1
  901. .else
  902.  bc\0 4,4*(\1)+1,\2
  903. .endif
  904. .endm
  905.  
  906. .macro beq
  907. .ifeq $NARG-1
  908.  bc\0 12,2,\1
  909. .else
  910.  bc\0 12,4*(\1)+2,\2
  911. .endif
  912. .endm
  913.  
  914. .macro bge
  915. .ifeq $NARG-1
  916.  bc\0 4,0,\1
  917. .else
  918.  bc\0 4,4*(\1)+0,\2
  919. .endif
  920. .endm
  921.  
  922. .macro bgt
  923. .ifeq $NARG-1
  924.  bc\0 12,1,\1
  925. .else
  926.  bc\0 12,4*(\1)+1,\2
  927. .endif
  928. .endm
  929.  
  930. .macro bnl
  931. .ifeq $NARG-1
  932.  bc\0 4,0,\1
  933. .else
  934.  bc\0 4,4*(\1)+0,\2
  935. .endif
  936. .endm
  937.  
  938. .macro bne
  939. .ifeq $NARG-1
  940.  bc\0 4,2,\1
  941. .else
  942.  bc\0 4,4*(\1)+2,\2
  943. .endif
  944. .endm
  945.  
  946. .macro bng
  947. .ifeq $NARG-1
  948.  bc\0 4,1,\1
  949. .else
  950.  bc\0 4,4*(\1)+1,\2
  951. .endif
  952. .endm
  953.  
  954. .macro bso
  955. .ifeq $NARG-1
  956.  bc\0 12,3,\1
  957. .else
  958.  bc\0 12,4*(\1)+3,\2
  959. .endif
  960. .endm
  961.  
  962. .macro bns
  963. .ifeq $NARG-1
  964.  bc\0 4,3,\1
  965. .else
  966.  bc\0 4,4*(\1)+3,\2
  967. .endif
  968. .endm
  969.  
  970. .macro bun
  971. .ifeq $NARG-1
  972.  bc\0 12,3,\1
  973. .else
  974.  bc\0 12,4*(\1)+3,\2
  975. .endif
  976. .endm
  977.  
  978. .macro bnu
  979. .ifeq $NARG-1
  980.  bc\0 4,3,\1
  981. .else
  982.  bc\0 4,4*(\1)+3,\2
  983. .endif
  984. .endm
  985.  
  986. .macro blta
  987. .ifeq $NARG-1
  988.  bca\0 12,0,\1
  989. .else
  990.  bca\0 12,4*(\1)+0,\2
  991. .endif
  992. .endm
  993.  
  994. .macro blea
  995. .ifeq $NARG-1
  996.  bca\0 4,1,\1
  997. .else
  998.  bca\0 4,4*(\1)+1,\2
  999. .endif
  1000. .endm
  1001.  
  1002. .macro beqa
  1003. .ifeq $NARG-1
  1004.  bca\0 12,2,\1
  1005. .else
  1006.  bca\0 12,4*(\1)+2,\2
  1007. .endif
  1008. .endm
  1009.  
  1010. .macro bgea
  1011. .ifeq $NARG-1
  1012.  bca\0 4,0,\1
  1013. .else
  1014.  bca\0 4,4*(\1)+0,\2
  1015. .endif
  1016. .endm
  1017.  
  1018. .macro bgta
  1019. .ifeq $NARG-1
  1020.  bca\0 12,1,\1
  1021. .else
  1022.  bca\0 12,4*(\1)+1,\2
  1023. .endif
  1024. .endm
  1025.  
  1026. .macro bnla
  1027. .ifeq $NARG-1
  1028.  bca\0 4,0,\1
  1029. .else
  1030.  bca\0 4,4*(\1)+0,\2
  1031. .endif
  1032. .endm
  1033.  
  1034. .macro bnea
  1035. .ifeq $NARG-1
  1036.  bca\0 4,2,\1
  1037. .else
  1038.  bca\0 4,4*(\1)+2,\2
  1039. .endif
  1040. .endm
  1041.  
  1042. .macro bnga
  1043. .ifeq $NARG-1
  1044.  bca\0 4,1,\1
  1045. .else
  1046.  bca\0 4,4*(\1)+1,\2
  1047. .endif
  1048. .endm
  1049.  
  1050. .macro bsoa
  1051. .ifeq $NARG-1
  1052.  bca\0 12,3,\1
  1053. .else
  1054.  bca\0 12,4*(\1)+3,\2
  1055. .endif
  1056. .endm
  1057.  
  1058. .macro bnsa
  1059. .ifeq $NARG-1
  1060.  bca\0 4,3,\1
  1061. .else
  1062.  bca\0 4,4*(\1)+3,\2
  1063. .endif
  1064. .endm
  1065.  
  1066. .macro buna
  1067. .ifeq $NARG-1
  1068.  bca\0 12,3,\1
  1069. .else
  1070.  bca\0 12,4*(\1)+3,\2
  1071. .endif
  1072. .endm
  1073.  
  1074. .macro bnua
  1075. .ifeq $NARG-1
  1076.  bca\0 4,3,\1
  1077. .else
  1078.  bca\0 4,4*(\1)+3,\2
  1079. .endif
  1080. .endm
  1081.  
  1082.  
  1083. .macro bltlr
  1084. .ifeq $NARG-1
  1085.  bclr\0 12,4*(\1)+0
  1086. .else
  1087.  bclr\0 12,0
  1088. .endif
  1089. .endm
  1090.  
  1091. .macro blelr
  1092. .ifeq $NARG-1
  1093.  bclr\0 4,4*(\1)+1
  1094. .else
  1095.  bclr\0 4,1
  1096. .endif
  1097. .endm
  1098.  
  1099. .macro beqlr
  1100. .ifeq $NARG-1
  1101.  bclr\0 12,4*(\1)+2
  1102. .else
  1103.  bclr\0 12,2
  1104. .endif
  1105. .endm
  1106.  
  1107. .macro bgelr
  1108. .ifeq $NARG-1
  1109.  bclr\0 4,4*(\1)+0
  1110. .else
  1111.  bclr\0 4,0
  1112. .endif
  1113. .endm
  1114.  
  1115. .macro bgtlr
  1116. .ifeq $NARG-1
  1117.  bclr\0 12,4*(\1)+1
  1118. .else
  1119.  bclr\0 12,1
  1120. .endif
  1121. .endm
  1122.  
  1123. .macro bnllr
  1124. .ifeq $NARG-1
  1125.  bclr\0 4,4*(\1)+0
  1126. .else
  1127.  bclr\0 4,0
  1128. .endif
  1129. .endm
  1130.  
  1131. .macro bnelr
  1132. .ifeq $NARG-1
  1133.  bclr\0 4,4*(\1)+2
  1134. .else
  1135.  bclr\0 4,2
  1136. .endif
  1137. .endm
  1138.  
  1139. .macro bnglr
  1140. .ifeq $NARG-1
  1141.  bclr\0 4,4*(\1)+1
  1142. .else
  1143.  bclr\0 4,1
  1144. .endif
  1145. .endm
  1146.  
  1147. .macro bsolr
  1148. .ifeq $NARG-1
  1149.  bclr\0 12,4*(\1)+3
  1150. .else
  1151.  bclr\0 12,3
  1152. .endif
  1153. .endm
  1154.  
  1155. .macro bnslr
  1156. .ifeq $NARG-1
  1157.  bclr\0 4,4*(\1)+3
  1158. .else
  1159.  bclr\0 4,3
  1160. .endif
  1161. .endm
  1162.  
  1163. .macro bunlr
  1164. .ifeq $NARG-1
  1165.  bclr\0 12,4*(\1)+3
  1166. .else
  1167.  bclr\0 12,3
  1168. .endif
  1169. .endm
  1170.  
  1171. .macro bnulr
  1172. .ifeq $NARG-1
  1173.  bclr\0 4,4*(\1)+3
  1174. .else
  1175.  bclr\0 4,3
  1176. .endif
  1177. .endm
  1178.  
  1179. .macro bltctr
  1180. .ifeq $NARG-1
  1181.  bcctr\0 12,4*(\1)+0
  1182. .else
  1183.  bcctr\0 12,0
  1184. .endif
  1185. .endm
  1186.  
  1187. .macro blectr
  1188. .ifeq $NARG-1
  1189.  bcctr\0 4,4*(\1)+1
  1190. .else
  1191.  bcctr\0 4,1
  1192. .endif
  1193. .endm
  1194.  
  1195. .macro beqctr
  1196. .ifeq $NARG-1
  1197.  bcctr\0 12,4*(\1)+2
  1198. .else
  1199.  bcctr\0 12,2
  1200. .endif
  1201. .endm
  1202.  
  1203. .macro bgectr
  1204. .ifeq $NARG-1
  1205.  bcctr\0 4,4*(\1)+0
  1206. .else
  1207.  bcctr\0 4,0
  1208. .endif
  1209. .endm
  1210.  
  1211. .macro bgtctr
  1212. .ifeq $NARG-1
  1213.  bcctr\0 12,4*(\1)+1
  1214. .else
  1215.  bcctr\0 12,1
  1216. .endif
  1217. .endm
  1218.  
  1219. .macro bnlctr
  1220. .ifeq $NARG-1
  1221.  bcctr\0 4,4*(\1)+0
  1222. .else
  1223.  bcctr\0 4,0
  1224. .endif
  1225. .endm
  1226.  
  1227. .macro bnectr
  1228. .ifeq $NARG-1
  1229.  bcctr\0 4,4*(\1)+2
  1230. .else
  1231.  bcctr\0 4,2
  1232. .endif
  1233. .endm
  1234.  
  1235. .macro bngctr
  1236. .ifeq $NARG-1
  1237.  bcctr\0 4,4*(\1)+1
  1238. .else
  1239.  bcctr\0 4,1
  1240. .endif
  1241. .endm
  1242.  
  1243. .macro bsoctr
  1244. .ifeq $NARG-1
  1245.  bcctr\0 12,4*(\1)+3
  1246. .else
  1247.  bcctr\0 12,3
  1248. .endif
  1249. .endm
  1250.  
  1251. .macro bnsctr
  1252. .ifeq $NARG-1
  1253.  bcctr\0 4,4*(\1)+3
  1254. .else
  1255.  bcctr\0 4,3
  1256. .endif
  1257. .endm
  1258.  
  1259. .macro bunctr
  1260. .ifeq $NARG-1
  1261.  bcctr\0 12,4*(\1)+3
  1262. .else
  1263.  bcctr\0 12,3
  1264. .endif
  1265. .endm
  1266.  
  1267. .macro bnuctr
  1268. .ifeq $NARG-1
  1269.  bcctr\0 4,4*(\1)+3
  1270. .else
  1271.  bcctr\0 4,3
  1272. .endif
  1273. .endm
  1274.  
  1275.  
  1276. .macro bltl
  1277. .ifeq $NARG-1
  1278.  bcl\0 12,0,\1
  1279. .else
  1280.  bcl\0 12,4*(\1)+0,\2
  1281. .endif
  1282. .endm
  1283.  
  1284. .macro blel
  1285. .ifeq $NARG-1
  1286.  bcl\0 4,1,\1
  1287. .else
  1288.  bcl\0 4,4*(\1)+1,\2
  1289. .endif
  1290. .endm
  1291.  
  1292. .macro beql
  1293. .ifeq $NARG-1
  1294.  bcl\0 12,2,\1
  1295. .else
  1296.  bcl\0 12,4*(\1)+2,\2
  1297. .endif
  1298. .endm
  1299.  
  1300. .macro bgel
  1301. .ifeq $NARG-1
  1302.  bcl\0 4,0,\1
  1303. .else
  1304.  bcl\0 4,4*(\1)+0,\2
  1305. .endif
  1306. .endm
  1307.  
  1308. .macro bgtl
  1309. .ifeq $NARG-1
  1310.  bcl\0 12,1,\1
  1311. .else
  1312.  bcl\0 12,4*(\1)+1,\2
  1313. .endif
  1314. .endm
  1315.  
  1316. .macro bnll
  1317. .ifeq $NARG-1
  1318.  bcl\0 4,0,\1
  1319. .else
  1320.  bcl\0 4,4*(\1)+0,\2
  1321. .endif
  1322. .endm
  1323.  
  1324. .macro bnel
  1325. .ifeq $NARG-1
  1326.  bcl\0 4,2,\1
  1327. .else
  1328.  bcl\0 4,4*(\1)+2,\2
  1329. .endif
  1330. .endm
  1331.  
  1332. .macro bngl
  1333. .ifeq $NARG-1
  1334.  bcl\0 4,1,\1
  1335. .else
  1336.  bcl\0 4,4*(\1)+1,\2
  1337. .endif
  1338. .endm
  1339.  
  1340. .macro bsol
  1341. .ifeq $NARG-1
  1342.  bcl\0 12,3,\1
  1343. .else
  1344.  bcl\0 12,4*(\1)+3,\2
  1345. .endif
  1346. .endm
  1347.  
  1348. .macro bnsl
  1349. .ifeq $NARG-1
  1350.  bcl\0 4,3,\1
  1351. .else
  1352.  bcl\0 4,4*(\1)+3,\2
  1353. .endif
  1354. .endm
  1355.  
  1356. .macro bunl
  1357. .ifeq $NARG-1
  1358.  bcl\0 12,3,\1
  1359. .else
  1360.  bcl\0 12,4*(\1)+3,\2
  1361. .endif
  1362. .endm
  1363.  
  1364. .macro bnul
  1365. .ifeq $NARG-1
  1366.  bcl\0 4,3,\1
  1367. .else
  1368.  bcl\0 4,4*(\1)+3,\2
  1369. .endif
  1370. .endm
  1371.  
  1372. .macro bltla
  1373. .ifeq $NARG-1
  1374.  bcla\0 12,0,\1
  1375. .else
  1376.  bcla\0 12,4*(\1)+0,\2
  1377. .endif
  1378. .endm
  1379.  
  1380. .macro blela
  1381. .ifeq $NARG-1
  1382.  bcla\0 4,1,\1
  1383. .else
  1384.  bcla\0 4,4*(\1)+1,\2
  1385. .endif
  1386. .endm
  1387.  
  1388. .macro beqla
  1389. .ifeq $NARG-1
  1390.  bcla\0 12,2,\1
  1391. .else
  1392.  bcla\0 12,4*(\1)+2,\2
  1393. .endif
  1394. .endm
  1395.  
  1396. .macro bgela
  1397. .ifeq $NARG-1
  1398.  bcla\0 4,0,\1
  1399. .else
  1400.  bcla\0 4,4*(\1)+0,\2
  1401. .endif
  1402. .endm
  1403.  
  1404. .macro bgtla
  1405. .ifeq $NARG-1
  1406.  bcla\0 12,1,\1
  1407. .else
  1408.  bcla\0 12,4*(\1)+1,\2
  1409. .endif
  1410. .endm
  1411.  
  1412. .macro bnlla
  1413. .ifeq $NARG-1
  1414.  bcla\0 4,0,\1
  1415. .else
  1416.  bcla\0 4,4*(\1)+0,\2
  1417. .endif
  1418. .endm
  1419.  
  1420. .macro bnela
  1421. .ifeq $NARG-1
  1422.  bcla\0 4,2,\1
  1423. .else
  1424.  bcla\0 4,4*(\1)+2,\2
  1425. .endif
  1426. .endm
  1427.  
  1428. .macro bngla
  1429. .ifeq $NARG-1
  1430.  bcla\0 4,1,\1
  1431. .else
  1432.  bcla\0 4,4*(\1)+1,\2
  1433. .endif
  1434. .endm
  1435.  
  1436. .macro bsola
  1437. .ifeq $NARG-1
  1438.  bcla\0 12,3,\1
  1439. .else
  1440.  bcla\0 12,4*(\1)+3,\2
  1441. .endif
  1442. .endm
  1443.  
  1444. .macro bnsla
  1445. .ifeq $NARG-1
  1446.  bcla\0 4,3,\1
  1447. .else
  1448.  bcla\0 4,4*(\1)+3,\2
  1449. .endif
  1450. .endm
  1451.  
  1452. .macro bunla
  1453. .ifeq $NARG-1
  1454.  bcla\0 12,3,\1
  1455. .else
  1456.  bcla\0 12,4*(\1)+3,\2
  1457. .endif
  1458. .endm
  1459.  
  1460. .macro bnula
  1461. .ifeq $NARG-1
  1462.  bcla\0 4,3,\1
  1463. .else
  1464.  bcla\0 4,4*(\1)+3,\2
  1465. .endif
  1466. .endm
  1467.  
  1468.  
  1469. .macro bltlrl
  1470. .ifeq $NARG-1
  1471.  bclrl\0 12,4*(\1)+0
  1472. .else
  1473.  bclrl\0 12,0
  1474. .endif
  1475. .endm
  1476.  
  1477. .macro blelrl
  1478. .ifeq $NARG-1
  1479.  bclrl\0 4,4*(\1)+1
  1480. .else
  1481.  bclrl\0 4,1
  1482. .endif
  1483. .endm
  1484.  
  1485. .macro beqlrl
  1486. .ifeq $NARG-1
  1487.  bclrl\0 12,4*(\1)+2
  1488. .else
  1489.  bclrl\0 12,2
  1490. .endif
  1491. .endm
  1492.  
  1493. .macro bgelrl
  1494. .ifeq $NARG-1
  1495.  bclrl\0 4,4*(\1)+0
  1496. .else
  1497.  bclrl\0 4,0
  1498. .endif
  1499. .endm
  1500.  
  1501. .macro bgtlrl
  1502. .ifeq $NARG-1
  1503.  bclrl\0 12,4*(\1)+1
  1504. .else
  1505.  bclrl\0 12,1
  1506. .endif
  1507. .endm
  1508.  
  1509. .macro bnllrl
  1510. .ifeq $NARG-1
  1511.  bclrl\0 4,4*(\1)+0
  1512. .else
  1513.  bclrl\0 4,0
  1514. .endif
  1515. .endm
  1516.  
  1517. .macro bnelrl
  1518. .ifeq $NARG-1
  1519.  bclrl\0 4,4*(\1)+2
  1520. .else
  1521.  bclrl\0 4,2
  1522. .endif
  1523. .endm
  1524.  
  1525. .macro bnglrl
  1526. .ifeq $NARG-1
  1527.  bclrl\0 4,4*(\1)+1
  1528. .else
  1529.  bclrl\0 4,1
  1530. .endif
  1531. .endm
  1532.  
  1533. .macro bsolrl
  1534. .ifeq $NARG-1
  1535.  bclrl\0 12,4*(\1)+3
  1536. .else
  1537.  bclrl\0 12,3
  1538. .endif
  1539. .endm
  1540.  
  1541. .macro bnslrl
  1542. .ifeq $NARG-1
  1543.  bclrl\0 4,4*(\1)+3
  1544. .else
  1545.  bclrl\0 4,3
  1546. .endif
  1547. .endm
  1548.  
  1549. .macro bunlrl
  1550. .ifeq $NARG-1
  1551.  bclrl\0 12,4*(\1)+3
  1552. .else
  1553.  bclrl\0 12,3
  1554. .endif
  1555. .endm
  1556.  
  1557. .macro bnulrl
  1558. .ifeq $NARG-1
  1559.  bclrl\0 4,4*(\1)+3
  1560. .else
  1561.  bclrl\0 4,3
  1562. .endif
  1563. .endm
  1564.  
  1565. .macro bltctrl
  1566. .ifeq $NARG-1
  1567.  bcctrl\0 12,4*(\1)+0
  1568. .else
  1569.  bcctrl\0 12,0
  1570. .endif
  1571. .endm
  1572.  
  1573. .macro blectrl
  1574. .ifeq $NARG-1
  1575.  bcctrl\0 4,4*(\1)+1
  1576. .else
  1577.  bcctrl\0 4,1
  1578. .endif
  1579. .endm
  1580.  
  1581. .macro beqctrl
  1582. .ifeq $NARG-1
  1583.  bcctrl\0 12,4*(\1)+2
  1584. .else
  1585.  bcctrl\0 12,2
  1586. .endif
  1587. .endm
  1588.  
  1589. .macro bgectrl
  1590. .ifeq $NARG-1
  1591.  bcctrl\0 4,4*(\1)+0
  1592. .else
  1593.  bcctrl\0 4,0
  1594. .endif
  1595. .endm
  1596.  
  1597. .macro bgtctrl
  1598. .ifeq $NARG-1
  1599.  bcctrl\0 12,4*(\1)+1
  1600. .else
  1601.  bcctrl\0 12,1
  1602. .endif
  1603. .endm
  1604.  
  1605. .macro bnlctrl
  1606. .ifeq $NARG-1
  1607.  bcctrl\0 4,4*(\1)+0
  1608. .else
  1609.  bcctrl\0 4,0
  1610. .endif
  1611. .endm
  1612.  
  1613. .macro bnectrl
  1614. .ifeq $NARG-1
  1615.  bcctrl\0 4,4*(\1)+2
  1616. .else
  1617.  bcctrl\0 4,2
  1618. .endif
  1619. .endm
  1620.  
  1621. .macro bngctrl
  1622. .ifeq $NARG-1
  1623.  bcctrl\0 4,4*(\1)+1
  1624. .else
  1625.  bcctrl\0 4,1
  1626. .endif
  1627. .endm
  1628.  
  1629. .macro bsoctrl
  1630. .ifeq $NARG-1
  1631.  bcctrl\0 12,4*(\1)+3
  1632. .else
  1633.  bcctrl\0 12,3
  1634. .endif
  1635. .endm
  1636.  
  1637. .macro bnsctrl
  1638. .ifeq $NARG-1
  1639.  bcctrl\0 4,4*(\1)+3
  1640. .else
  1641.  bcctrl\0 4,3
  1642. .endif
  1643. .endm
  1644.  
  1645. .macro bunctrl
  1646. .ifeq $NARG-1
  1647.  bcctrl\0 12,4*(\1)+3
  1648. .else
  1649.  bcctrl\0 12,3
  1650. .endif
  1651. .endm
  1652.  
  1653. .macro bnuctrl
  1654. .ifeq $NARG-1
  1655.  bcctrl\0 4,4*(\1)+3
  1656. .else
  1657.  bcctrl\0 4,3
  1658. .endif
  1659. .endm
  1660.  
  1661.  
  1662. .macro crset
  1663.  creqv \1,\1,\1
  1664. .endm
  1665.  
  1666. .macro crclr
  1667.  crxor \1,\1,\1
  1668. .endm
  1669.  
  1670. .macro crmove
  1671.  cror \1,\2,\2
  1672. .endm
  1673.  
  1674. .macro crnot
  1675.  crnor \1,\2,\2
  1676. .endm
  1677.  
  1678.  
  1679. .macro trap
  1680.  tw 31,0,0
  1681. .endm
  1682.  
  1683. .macro twlt
  1684.  tw 16,\1,\2
  1685. .endm
  1686.  
  1687. .macro twle
  1688.  tw 20,\1,\2
  1689. .endm
  1690.  
  1691. .macro tweq
  1692.  tw 4,\1,\2
  1693. .endm
  1694.  
  1695. .macro twge
  1696.  tw 12,\1,\2
  1697. .endm
  1698.  
  1699. .macro twgt
  1700.  tw 8,\1,\2
  1701. .endm
  1702.  
  1703. .macro twnl
  1704.  tw 12,\1,\2
  1705. .endm
  1706.  
  1707. .macro twne
  1708.  tw 24,\1,\2
  1709. .endm
  1710.  
  1711. .macro twng
  1712.  tw 20,\1,\2
  1713. .endm
  1714.  
  1715. .macro twllt
  1716.  tw 2,\1,\2
  1717. .endm
  1718.  
  1719. .macro twlle
  1720.  tw 6,\1,\2
  1721. .endm
  1722.  
  1723. .macro twlge
  1724.  tw 5,\1,\2
  1725. .endm
  1726.  
  1727. .macro twlgt
  1728.  tw 1,\1,\2
  1729. .endm
  1730.  
  1731. .macro twlnl
  1732.  tw 5,\1,\2
  1733. .endm
  1734.  
  1735. .macro twlng
  1736.  tw 6,\1,\2
  1737. .endm
  1738.  
  1739. .macro twlti
  1740.  twi 16,\1,\2
  1741. .endm
  1742.  
  1743. .macro twlei
  1744.  twi 20,\1,\2
  1745. .endm
  1746.  
  1747. .macro tweqi
  1748.  twi 4,\1,\2
  1749. .endm
  1750.  
  1751. .macro twgei
  1752.  twi 12,\1,\2
  1753. .endm
  1754.  
  1755. .macro twgti
  1756.  twi 8,\1,\2
  1757. .endm
  1758.  
  1759. .macro twnli
  1760.  twi 12,\1,\2
  1761. .endm
  1762.  
  1763. .macro twnei
  1764.  twi 24,\1,\2
  1765. .endm
  1766.  
  1767. .macro twngi
  1768.  twi 20,\1,\2
  1769. .endm
  1770.  
  1771. .macro twllti
  1772.  twi 2,\1,\2
  1773. .endm
  1774.  
  1775. .macro twllei
  1776.  twi 6,\1,\2
  1777. .endm
  1778.  
  1779. .macro twlgei
  1780.  twi 5,\1,\2
  1781. .endm
  1782.  
  1783. .macro twlgti
  1784.  twi 1,\1,\2
  1785. .endm
  1786.  
  1787. .macro twlnli
  1788.  twi 5,\1,\2
  1789. .endm
  1790.  
  1791. .macro twlngi
  1792.  twi 6,\1,\2
  1793. .endm
  1794.  
  1795. .macro tdlt
  1796.  td 16,\1,\2
  1797. .endm
  1798.  
  1799. .macro tdle
  1800.  td 20,\1,\2
  1801. .endm
  1802.  
  1803. .macro tdeq
  1804.  td 4,\1,\2
  1805. .endm
  1806.  
  1807. .macro tdge
  1808.  td 12,\1,\2
  1809. .endm
  1810.  
  1811. .macro tdgt
  1812.  td 8,\1,\2
  1813. .endm
  1814.  
  1815. .macro tdnl
  1816.  td 12,\1,\2
  1817. .endm
  1818.  
  1819. .macro tdne
  1820.  td 24,\1,\2
  1821. .endm
  1822.  
  1823. .macro tdng
  1824.  td 20,\1,\2
  1825. .endm
  1826.  
  1827. .macro tdllt
  1828.  td 2,\1,\2
  1829. .endm
  1830.  
  1831. .macro tdlle
  1832.  td 6,\1,\2
  1833. .endm
  1834.  
  1835. .macro tdlge
  1836.  td 5,\1,\2
  1837. .endm
  1838.  
  1839. .macro tdlgt
  1840.  td 1,\1,\2
  1841. .endm
  1842.  
  1843. .macro tdlnl
  1844.  td 5,\1,\2
  1845. .endm
  1846.  
  1847. .macro tdlng
  1848.  td 6,\1,\2
  1849. .endm
  1850.  
  1851. .macro tdlti
  1852.  tdi 16,\1,\2
  1853. .endm
  1854.  
  1855. .macro tdlei
  1856.  tdi 20,\1,\2
  1857. .endm
  1858.  
  1859. .macro tdeqi
  1860.  tdi 4,\1,\2
  1861. .endm
  1862.  
  1863. .macro tdgei
  1864.  tdi 12,\1,\2
  1865. .endm
  1866.  
  1867. .macro tdgti
  1868.  tdi 8,\1,\2
  1869. .endm
  1870.  
  1871. .macro tdnli
  1872.  tdi 12,\1,\2
  1873. .endm
  1874.  
  1875. .macro tdnei
  1876.  tdi 24,\1,\2
  1877. .endm
  1878.  
  1879. .macro tdngi
  1880.  tdi 20,\1,\2
  1881. .endm
  1882.  
  1883. .macro tdllti
  1884.  tdi 2,\1,\2
  1885. .endm
  1886.  
  1887. .macro tdllei
  1888.  tdi 6,\1,\2
  1889. .endm
  1890.  
  1891. .macro tdlgei
  1892.  tdi 5,\1,\2
  1893. .endm
  1894.  
  1895. .macro tdlgti
  1896.  tdi 1,\1,\2
  1897. .endm
  1898.  
  1899. .macro tdlnli
  1900.  tdi 5,\1,\2
  1901. .endm
  1902.  
  1903. .macro tdlngi
  1904.  tdi 6,\1,\2
  1905. .endm
  1906.  
  1907.  
  1908. .macro mtxer
  1909.  mtspr 1,\1
  1910. .endm
  1911.  
  1912. .macro mtlr
  1913.  mtspr 8,\1
  1914. .endm
  1915.  
  1916. .macro mtctr
  1917.  mtspr 9,\1
  1918. .endm
  1919.  
  1920. .macro mtdsisr
  1921.  mtspr 18,\1
  1922. .endm
  1923.  
  1924. .macro mtdar
  1925.  mtspr 19,\1
  1926. .endm
  1927.  
  1928. .macro mtdec
  1929.  mtspr 22,\1
  1930. .endm
  1931.  
  1932. .macro mtsdr1
  1933.  mtspr 25,\1
  1934. .endm
  1935.  
  1936. .macro mtsrr0
  1937.  mtspr 26,\1
  1938. .endm
  1939.  
  1940. .macro mtsrr1
  1941.  mtspr 27,\1
  1942. .endm
  1943.  
  1944. .macro mtsprg
  1945.  mtspr 272+(\1),\2
  1946. .endm
  1947.  
  1948. .macro mtasr
  1949.  mtspr 280,\1
  1950. .endm
  1951.  
  1952. .macro mtear
  1953.  mtspr 282,\1
  1954. .endm
  1955.  
  1956. .macro mttbl
  1957.  mtspr 284,\1
  1958. .endm
  1959.  
  1960. .macro mttbu
  1961.  mtspr 285,\1
  1962. .endm
  1963.  
  1964. .macro mtibatu
  1965.  mtspr 528+2*(\1),\2
  1966. .endm
  1967.  
  1968. .macro mtibatl
  1969.  mtspr 529+2*(\1),\2
  1970. .endm
  1971.  
  1972. .macro mtdbatu
  1973.  mtspr 536+2*(\1),\2
  1974. .endm
  1975.  
  1976. .macro mtdbatl
  1977.  mtspr 537+2*(\1),\2
  1978. .endm
  1979.  
  1980. .macro mtdabr
  1981.  mtspr 1013,\1
  1982. .endm
  1983.  
  1984. .macro mfxer
  1985.  mfspr \1,1
  1986. .endm
  1987.  
  1988. .macro mflr
  1989.  mfspr \1,8
  1990. .endm
  1991.  
  1992. .macro mfctr
  1993.  mfspr \1,9
  1994. .endm
  1995.  
  1996. .macro mfdsisr
  1997.  mfspr \1,18
  1998. .endm
  1999.  
  2000. .macro mfdar
  2001.  mfspr \1,19
  2002. .endm
  2003.  
  2004. .macro mfdec
  2005.  mfspr 22,\1
  2006. .endm
  2007.  
  2008. .macro mfsdr1
  2009.  mfspr \1,25
  2010. .endm
  2011.  
  2012. .macro mfsrr0
  2013.  mfspr \1,26
  2014. .endm
  2015.  
  2016. .macro mfsrr1
  2017.  mfspr \1,27
  2018. .endm
  2019.  
  2020. .macro mfsprg
  2021.  mfspr \1,272+(\2)
  2022. .endm
  2023.  
  2024. .macro mfasr
  2025.  mfspr \1,280
  2026. .endm
  2027.  
  2028. .macro mfear
  2029.  mfspr \1,282
  2030. .endm
  2031.  
  2032. .macro mftbl
  2033.  mftb \1,268
  2034. .endm
  2035.  
  2036. .macro mftbu
  2037.  mftb \1,269
  2038. .endm
  2039.  
  2040. .macro mfpvr
  2041.  mfspr \1,287
  2042. .endm
  2043.  
  2044. .macro mfibatu
  2045.  mfspr \1,528+2*(\2)
  2046. .endm
  2047.  
  2048. .macro mfibatl
  2049.  mfspr \1,529+2*(\2)
  2050. .endm
  2051.  
  2052. .macro mfdbatu
  2053.  mfspr \1,536+2*(\2)
  2054. .endm
  2055.  
  2056. .macro mfdbatl
  2057.  mfspr \1,537+2*(\2)
  2058. .endm
  2059.  
  2060. .macro mfdabr
  2061.  mfspr \1,1013
  2062. .endm
  2063.  
  2064.  
  2065. .macro nop
  2066.  ori 0,0,0
  2067. .endm
  2068.  
  2069. .macro li
  2070.  addi \1,0,\2
  2071. .endm
  2072.  
  2073. .macro lis
  2074.  addis \1,0,\2
  2075. .endm
  2076.  
  2077. .macro mr
  2078.  or \1,\2,\2
  2079. .endm
  2080.  
  2081. .macro mr.
  2082.  or. \1,\2,\2
  2083. .endm
  2084.  
  2085. .macro not
  2086.  nor \1,\2,\2
  2087. .endm
  2088.  
  2089. .macro not.
  2090.  nor. \1,\2,\2
  2091. .endm
  2092.  
  2093. .macro mtcr
  2094.  mtcrf 0xff,\1
  2095. .endm
  2096.  
  2097.